<?php
require_once "includes/config.php";
require_once "includes/functions.php";
require_once 'includes/class.phpmailer.php';
ob_start();
session_start();
$sessid=session_id();
$msg = "";
$email=trim($_SESSION['user_email']);
$msg="<table width='100%' border='0' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px; line-height:25px'>
					  <tr>
						<td width='18%' height='41'><table width='100%' border='0'>
						  <tr>
							<td width='19%' height='68'><img src='http://genisofttechnologies.com/php1/swapen/images/logo.gif' width='208' height='83'></td>
							<td width='81%'>Swapen sent this message from Product sold for Local Pickup.</td>
						  </tr>
						</table></td>
					  </tr>
					  <tr>
						<td height='32' colspan='2' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:13px;color:#FFFFFF;background-color:#0FB6FA;'><b>&nbsp;&nbsp;Congrats! You have brought 55555</b></td>
					  </tr>
					  <tr>
						<td>
						  <table width='100%' border='0'>
							<tr>
							  <td width='71%' height='124'><p><b>Hi </b>, </p>
							  <p>Your product verification code is: 11111</p></td>
							  <td width='29%' style='text-align:center'></td>
							</tr>
						  </table>
						</td>
					  </tr>
					  <tr>
						<td><table width='100%' border='0'>
						  <tr>
							<td height='28' style='background-color:#F3F3F3'><b>If the above link does not work:</b></td>
						  </tr>
						  <tr>
							<td height='80'>Type in or copy and paste this link into your Web browser: <br>
							  <a href='swapen.com/index.php' target='_blank'>http://swapen.com/index.php </a><br></td>
						  </tr>
						</table></td>
					  </tr>
					</table>
					";
					//echo $_SESSION['user_email'];
					//exit();
					
					$to = $email;				
					$subject = ": Your purchased product code within Swapen.com";
					$body=$msg;				
					$from="mail@swapen.com";
					$header = 'From:'.$from.' \r\n';
					$header.='MIME-Version: 1.0' . "\r\n";
					$header.='Content-type: text/html; charset=iso-8859-1' . "\r\n";
					$header.='X-Mailer: PHP/' . phpversion();							
					mail($to,$subject,$body,$header);
							
					//$mail = new PHPMailer(); // defaults to using php "mail()"
//					$mail->MsgHTML($msg);
//					$mail->From       = "mail@swapen.com";
//					$mail->FromName   = "Swapen.com";
//					$mail->Subject    =": Your purchased product code within Swapen.com";
//					$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
//					$mail->AddAddress($email,$email);
//					$mail->Send();

?>
